﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Backend
{

    [KnownType(typeof(Airport))]
    [DataContract]
    public class Leg
    {
        [DataMember]
        private Airport departureAirp;
        [DataMember]
        private Airport arrivalAirp;
        [DataMember]
        private String departureTime;
        [DataMember]
        private String arrivalTime;
        [DataMember]
        private int numberOfSeats;
        [DataMember]
        private int id;
        [DataMember]
        private double price;
        [DataMember]
        private String aircraft;
        [DataMember]
        private String airline;
        

        public Leg(int id)
        {
            
            this.id = id;
        }

        public Leg()
        {

        }

        public String Airline
        {
            get { return airline; }
            set { airline = value; }
        }



        public String Aircraft
        {
            get { return aircraft; }
            set { aircraft = value; }
        }


        public double Price
        {
            get { return price; }
            set { price = value; }
        }




        public int Id
        {
            get { return id; }
            set { id = value; }
        }

     

        public Airport DepartureAirp 
        {
            get { return departureAirp; }
            set { departureAirp = value; }
        }

        public Airport ArrivalAirp //internal? 
        {
            get { return arrivalAirp; }
            set { arrivalAirp = value; }
        }

        public String DepartureTime
        {
            get { return departureTime; }
            set { departureTime = value; }
        }

        public String ArrivalTime
        {
            get { return arrivalTime; }
            set { arrivalTime = value; }
        }

        public int NumberOfSeats
        {
            get { return numberOfSeats; }
            set { numberOfSeats = value; }
        }

    }
}
